﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CanSWAT.ArcSWAT
{
    partial class ElevationBandDisplayFrm : Form
    {
        private SortedDictionary<int, Subbasin> _subbasins;

        public ElevationBandDisplayFrm(SortedDictionary<int, Subbasin> subbasins)
        {
            InitializeComponent();

            _subbasins = subbasins;
        }

        private void ElevationBandDisplayFrm_Load(object sender, EventArgs e)
        {
            foreach (Subbasin sub in _subbasins.Values)
            {
                TreeNode subNode = treeView1.Nodes.Add("Subbasin" + sub.ID.ToString());

                List<ElevationBand> bands = sub.Bands;
                if (bands == null) continue;

                foreach (ElevationBand band in bands)
                    subNode.Nodes.Add(band.ToString());
                
            }

            treeView1.ExpandAll();
        }
    }
}
